﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BTalk.Crypto
{
    public class Crypto : ICrypto
    {
        public ICryptoStrategy Algorithm
        {
            get;
            set;
        }

        public byte[] Encode(byte[] message)
        {
            if (Algorithm != null)
            {
                return Algorithm.Encode(message);
            }

            return message;
        }

        public byte[] Decode(byte[] message)
        {
            if (Algorithm != null)
            {
                return Algorithm.Decode(message);
            }

            return message;
        }
    }
}
